﻿@{
    this.ViewBag.Title = "Error"; 
}
@model HandleErrorInfo 
<div id="main-home">
    @if (Model.Exception is ApplicationException)
    {
        <h1>@Model.Exception.Message</h1>
    }
    else
    {
        <h1>@("Error " + this.ViewContext.HttpContext.Response.StatusCode)</h1>
        <h2>@("Error thrown")</h2>
    }
    <div class="error-region">
        <p>
            <span>Controller: </span>
            <code>
                @Model.ControllerName
            </code>
        </p>
        <p>
            <span>Action: </span>
            <code>
                @Model.ActionName
            </code>
        </p>
    </div>
    <div class="error-region">
        <span>Message: </span>
        <pre>
            <code>
                @Model.Exception.Message
            </code>
        </pre>
        <span>StackTrace: </span>
        <pre>
            <code>
                @Model.Exception.StackTrace
            </code>
        </pre>
    </div>
</div>
